@extends('layout.layout')
@section('content')
<div class="widget">
<div class="widget">
                        <div class="widget-header">
                            <h4>用户修改</h4>
                        </div>
                        <div class="widget-content">
                               
                                @if(session('error'))
                                        {{session('error')}}
                                @endif
                                @if (count($errors) > 0)
                                <div class="alert alert-error">
                                <span class="close" data-dismiss="alert">×</span>
                                    <ul>
                                        @foreach ($errors->all() as $error)
                                            <li>{{ $error }}</li>

                                        @endforeach
                                    </ul>

                                </div>
                                @endif
                            <form class="form-horizontal" action="{{url('/admin/user/update')}}" method="post" enctype="multipart/form-data">
                            <input name="id" type="hidden" value="{{$user->id}}">
                                <div class="widget-header">
                                    <label class="control-label">邮箱/账号</label>
                                    <div class="controls">{{$user->email}}</div>
                                </div>
                                <div class="widget-header">
                                    <label class="control-label">游戏昵称</label>
                                    <div class="controls"><input name="username" type="text" value="{{$user->username}}"></div>
                                </div>
                                
                                <div class="widget-header">
                                    <label class="control-label">性别</label>
                                    <div class="controls"><input name="sex" type="radio"  value="1" @if($user->sex == 1)checked @endif>男&nbsp;&nbsp;
                                                            <input name="sex" type="radio"  value="2" @if($user->sex == 2)checked @endif>女&nbsp;&nbsp;
                                                            <input name="sex" type="radio"  value="3" @if($user->sex == 3)checked @endif>保密&nbsp;&nbsp;
                                    </div>
                                </div>
                                
                                
                                <div class="widget-header">
                                    <label class="control-label">用户权限</label>
                                    <div class="controls"><select name="qx" type="text"  placeholder="" style="background: rgba(0,0,0,0.5)">
                                        <option value="1">普通用户</option>
                                        <option value="2">管理员</option>
                                    </select>
                                    </div>
                                </div>
                                <div class="widget-header">
                                    <label class="control-label">头像</label>
                                    <div class="controls"><input name="pic" type="file"  placeholder="">
                                    <img src="/public/admin/userimage/s_{{$user->pic}}" alt="" width="100" height="100">
                                    </div>
                                </div>

                               <center>
                                <button  class="btn btn-primary btn-large  icon-ok">修改</button>
                                <button type="reset" class="btn btn-large icon-refresh">重置</button>
                                </center>
                                {{csrf_field()}}
                                
                                
                            </form>
                        </div>
                    </div>
                    </div>
@endsection